import fairseq

ckpt_path='examples/hubert/simple_kmeans/models/hubert_base_ls960.pt'
models,cfg,task=fairseq.checkpoint_utils.load_model_ensemble_and_task([ckpt_path])
model=models[0]